package cn.zsb.proxy.cglibProxy;

public class Client {
    public static void main(String[] args) {
        //目标对象
        TeacherDaoImpl target = new TeacherDaoImpl();
        //代理对象
        TeacherDaoImpl proxy = (TeacherDaoImpl) new ProxyFactory(target).getProxyInstance();
        //执行目标对象方法
        proxy.teach();
        System.out.println("---------------------");
        String subject = proxy.test("数学");
        System.out.println("test方法返回值：" + subject);
    }
}
